package com.bwie.controller;

import com.bwie.pojo.RuleType;
import com.bwie.service.RuleTypeService;
import com.bwie.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author GaoYiJie
 * @Description
 * @Create 2025/2/27 11:03
 * @Version 1.0
 */
@RestController
@RequestMapping("/shop/ruletype")
public class RuleTypeController {

    @Autowired
    RuleTypeService ruleTypeService;

    @PostMapping("/getRuleTypeList")
    public R getRuleTypeList(){
        return ruleTypeService.getRuleTypeList();
    }

    @PostMapping("/addRule")
    public R addRule(@RequestBody RuleType ruleType){
        return ruleTypeService.addRule(ruleType);
    }
}
